package cn.wit.sst.ml.kmeans;

import java.util.ArrayList;
import java.util.List;

/**
 * 代表一个聚类对象
 *
 */
public class Cluster {
	private Sample center;	// 中心
	private List<Sample> points = new ArrayList<>();		// 成员

	public Cluster(Sample center) {
		this.center = center;
	}

	public Sample getCenter() {
		return center;
	}

	public void setCenter(Sample center) {
		this.center = center;
	}

	public List<Sample> getPoints() {
		return points;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Cluster [center=");
		builder.append(center);
		builder.append(", points=");
		builder.append(points);
		builder.append("]");
		return builder.toString();
	}
}